﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Private/Privada.master" AutoEventWireup="true"
    CodeBehind="Index.aspx.cs" Inherits="HRP.Private.Vencimentos.Index" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PrivadaMainContent" runat="server">
    <div class="page-heading animated fadeInDownBig">
        <h1>Vencimentos</h1>
    </div>
    <div class="row">
        <div class="col-sm-3">
            <div class="form-group">
                <div class="col-sm-7">
                    <dl>
                        <dt>Mês </dt>
                        <dd>
                            <asp:DropDownList ID="dropDownListMes" CssClass="form-control selectpicker" runat="server">
                                <asp:ListItem Value="1">Janeiro</asp:ListItem>
                                <asp:ListItem Value="2">Fevereiro</asp:ListItem>
                                <asp:ListItem Value="3">Março</asp:ListItem>
                                <asp:ListItem Value="4">Abril</asp:ListItem>
                                <asp:ListItem Value="5">Maio</asp:ListItem>
                                <asp:ListItem Value="6">Junho</asp:ListItem>
                                <asp:ListItem Value="7">Julho</asp:ListItem>
                                <asp:ListItem Value="8">Agosto</asp:ListItem>
                                <asp:ListItem Value="9">Setembro</asp:ListItem>
                                <asp:ListItem Value="10">Outubro</asp:ListItem>
                                <asp:ListItem Value="11">Novembro</asp:ListItem>
                                <asp:ListItem Value="12">Dezembro</asp:ListItem>
                            </asp:DropDownList>
                        </dd>
                    </dl>
                </div>
                <div class="col-sm-5">
                    <dl>
                        <dt>Ano </dt>
                        <dd>
                            <asp:DropDownList ID="dropDownListAno" runat="server" CssClass="form-control selectpicker">
                                <asp:ListItem>2012</asp:ListItem>
                                <asp:ListItem>2013</asp:ListItem>
                                <asp:ListItem>2014</asp:ListItem>
                                <asp:ListItem>2015</asp:ListItem>
                                <asp:ListItem>2016</asp:ListItem>
                                <asp:ListItem>2017</asp:ListItem>
                                <asp:ListItem>2018</asp:ListItem>
                                <asp:ListItem>2019</asp:ListItem>
                                <asp:ListItem>2020</asp:ListItem>
                            </asp:DropDownList>
                        </dd>
                    </dl>
                </div>
            </div>
            <div class="col-sm-12">
                <dl>
                    <dt></dt>
                    <dd>
                        <asp:LinkButton ID="gerarBut" runat="server" CssClass="btn btn-success form-control">Gerar Vencimento Mensal  <i class="fa fa-cog"></i></asp:LinkButton>
                    </dd>
                </dl>
            </div>
            <br />
            <div class="col-sm-12">
                <div id="divLabel" runat="server" class="alert">
                    <asp:Label runat="server" ID="gerarSalarioLabel"></asp:Label>
                </div>
            </div>

        </div>
        <div class="col-sm-9">
            <div class="box-info animated fadeInDown">
                <h2>Últimos Vencimentos</h2>
                <%if (GridView1.Rows.Count == 0)
                  { %>
                <p class="text-muted">
                    Não foram gerados vencimentos para esta empresa.
                </p>
                <%}
                  else
                  { %>
                <div class="table-responsive">
                    <asp:GridView ID="GridView1" runat="server" CssClass="table table-hover table-striped"
                        AllowSorting="True" AllowPaging="True" OnPageIndexChanging="gvList_PageIndexChanging"
                        AutoGenerateColumns="False" GridLines="None" DataKeyNames="id" PageSize="12"
                        OnSorting="GridView1_Sorting">
                        <Columns>
                            <asp:BoundField DataField="mes" HeaderText="Mês" SortExpression="mes" />
                            <asp:BoundField DataField="ano" HeaderText="Ano" SortExpression="ano" />
                            <asp:BoundField DataField="total_funcionarios" HeaderText="Nº Funcionários" SortExpression="total_funcionarios" />
                            <asp:BoundField DataField="valor_total_salarios" HeaderText="Valor Salários" SortExpression="valor_total_salarios" />
                            <asp:BoundField DataField="valor_total_irt" HeaderText="Valor IRT" SortExpression="valor_total_irt" />
                            <asp:BoundField DataField="valor_total_ss" HeaderText="Valor SS" SortExpression="valor_total_ss" />
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <div class="btn-group btn-group-xs">
                                        <asp:LinkButton runat="server" CssClass="btn btn-default" ID="escolhaFact" CommandArgument='<%#Eval("id") %>'
                                            CommandName="idFunc" ToolTip="Consultar"><i class="fa fa-eye"></i></asp:LinkButton>
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
                <%} %>
            </div>
        </div>
    </div>
</asp:Content>
